Notebook Example
In [1]:
Copied!
import beamgis
import beamgis
In [2]:
Copied!
# adding a basemap to a map
# Create a map with a specific center and zoom level
m = beamgis.Map(center=(20, 0), zoom=2, height="600px")
m.add_basemap(basemap="CartoDB.DarkMatter")
m
# adding a basemap to a map
# Create a map with a specific center and zoom level
m = beamgis.Map(center=(20, 0), zoom=2, height="600px")
m.add_basemap(basemap="CartoDB.DarkMatter")
m
Out[2]:
In [3]:
Copied!
m = beamgis.Map(center=(20, 0), zoom=2, height="600px")
m.add_google_map("terrain")
m
m = beamgis.Map(center=(20, 0), zoom=2, height="600px")
m.add_google_map("terrain")
m
Out[3]:
In [4]:
Copied!
# Importing GeoJSON data from a URL
m = beamgis.Map()
url = r"https://github.com/opengeos/datasets/releases/download/us/us_southeast_countries.geojson"
m.add_geojson(url, zoom_to_layer=True, hover_style={"fillColor": "red"})
m
# Importing GeoJSON data from a URL
m = beamgis.Map()
url = r"https://github.com/opengeos/datasets/releases/download/us/us_southeast_countries.geojson"
m.add_geojson(url, zoom_to_layer=True, hover_style={"fillColor": "red"})
m
Out[4]:
In [5]:
Copied!
url = r"data\us_cities.shp"
url = r"data\us_cities.shp"
In [6]:
Copied!
m = beamgis.Map()
url = r"data\us_cities.shp"
m.add_shp(url, zoom_to_layer=True, hover_style={"fillColor": "red"})
m
m = beamgis.Map()
url = r"data\us_cities.shp"
m.add_shp(url, zoom_to_layer=True, hover_style={"fillColor": "red"})
m
Out[6]:
Using Folium in beamgis¶
In [7]:
Copied!
# import package
import beamgis.foliumap as beamgis
# import package
import beamgis.foliumap as beamgis
In [8]:
Copied!
self = beamgis.Map(center=[20, 0], zoom=2)
url = "https://github.com/opengeos/datasets/releases/download/world/countries.geojson"
self.add_geojson(url, name="Countries")
self.add_layer_control()
self
self = beamgis.Map(center=[20, 0], zoom=2)
url = "https://github.com/opengeos/datasets/releases/download/world/countries.geojson"
self.add_geojson(url, name="Countries")
self.add_layer_control()
self
Out[8]:
Make this Notebook Trusted to load map: File -> Trust Notebook